package leetcode.stack_queue;

import java.util.ArrayDeque;

public class Lc334 {

    public boolean increasingTriplet(int[] nums) {
        long a = Long.MAX_VALUE;
        long b = Long.MAX_VALUE;
        long c = Long.MAX_VALUE;

        for (int i = 0; i < nums.length; i++) {
            if (nums[i] < a) a = nums[i];
            else if (nums[i] < b && nums[i] > a) b = nums[i];
            else if (nums[i] < c && nums[i] > b) c = nums[i];
        }
        return c != Long.MAX_VALUE;
    }

    public static void main(String[] args) {
        Lc334 lc334 = new Lc334();
        System.out.println(lc334.increasingTriplet(new int[]{4, 5, 2147483647, 1, 2}));
        long c = Long.MAX_VALUE;
        System.out.println(c);
    }
}
